#include <iostream>
#include <cstring>
#include "Table.h"
#include "Advisor.h"
#include "Logic.h"
#include "Client.h"

int main(int argc, char* argv[])
{
/* Work paused until basic 1-local, 3-cpu works. */
//  char playerCodes[4][10];
//  /* Default game. */
//  if(argc == 1)
//  {
//    strcpy(playerCodes[0], "local");
//    strcpy(playerCodes[1], "ai");
//    strcpy(playerCodes[2], "ai");
//    strcpy(playerCodes[3], "ai");
//  }

  Table myTable(4);
 
  // Set AIs 
  Advisor masterAdvisor;
  myTable.players[1].setAdvisor(&masterAdvisor);
  myTable.players[2].setAdvisor(&masterAdvisor);
  myTable.players[3].setAdvisor(&masterAdvisor);

  Logic myLogic;
  myLogic.setTable(&myTable);
  Client firstClient(&myTable);
  
  while(myLogic.getGameWinner() == -1)
  {
    //cout<<"banana!"<<endl;
    firstClient.updateClient(&myTable);
    // myLogic.doTick();
    // Check IO. 
    // Update player->setMove
    // Force warFlag=false if put down card.
  }

}
